package com.Spring01;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @Author: YLBG-YCY-1325
 * @Description:
 * @Date: 2017/7/21
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = ExpressiveConfig.class)
@PropertySource("classpath:com/Spring01/app.properties")
public class EnvTest {
    @Autowired
    Environment env;

    @Test
    public void cdshoudNotNull() throws Exception {
        System.out.println(env.getProperty("title"));
    }

}
